package cn.iocoder.yudao.module.cfs.dal.mysql.datanbusermonitorinfo;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.cfs.controller.admin.datanbusermonitorinfo.vo.DataNbUsermonitorinfoPageReqVO;
import cn.iocoder.yudao.module.cfs.dal.dataobject.datanbusermonitorinfo.DataNbUsermonitorinfoDO;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.apache.ibatis.annotations.Mapper;

/**
 * 联网设备NB类型 Mapper
 *
 * @author 芋道源码
 */
@Mapper
@DS("chengan")
public interface DataNbUsermonitorinfoMapper extends BaseMapperX<DataNbUsermonitorinfoDO> {

    default PageResult<DataNbUsermonitorinfoDO> selectPage(DataNbUsermonitorinfoPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DataNbUsermonitorinfoDO>()
                .eqIfPresent(DataNbUsermonitorinfoDO::getCompanyCode, reqVO.getCompanyCode())
                .likeIfPresent(DataNbUsermonitorinfoDO::getMonitorName, reqVO.getMonitorName())
                .eqIfPresent(DataNbUsermonitorinfoDO::getMonitorCode, reqVO.getMonitorCode())
                .eqIfPresent(DataNbUsermonitorinfoDO::getSystem, reqVO.getSystem())
                .eqIfPresent(DataNbUsermonitorinfoDO::getDockCode, reqVO.getDockCode())
                .eqIfPresent(DataNbUsermonitorinfoDO::getDeviceCode, reqVO.getDeviceCode())
                .eqIfPresent(DataNbUsermonitorinfoDO::getMonitorType, reqVO.getMonitorType())
                .eqIfPresent(DataNbUsermonitorinfoDO::getCommOperator, reqVO.getCommOperator())
                .eqIfPresent(DataNbUsermonitorinfoDO::getCommProtocol, reqVO.getCommProtocol())
                .eqIfPresent(DataNbUsermonitorinfoDO::getImei, reqVO.getImei())
                .eqIfPresent(DataNbUsermonitorinfoDO::getIccid, reqVO.getIccid())
                .betweenIfPresent(DataNbUsermonitorinfoDO::getInstallDate, reqVO.getInstallDate())
                .eqIfPresent(DataNbUsermonitorinfoDO::getInstallAddress, reqVO.getInstallAddress())
                .betweenIfPresent(DataNbUsermonitorinfoDO::getNetworkDate, reqVO.getNetworkDate())
                .betweenIfPresent(DataNbUsermonitorinfoDO::getServicedDate, reqVO.getServicedDate())
                .eqIfPresent(DataNbUsermonitorinfoDO::getRunState, reqVO.getRunState())
                .eqIfPresent(DataNbUsermonitorinfoDO::getLng, reqVO.getLng())
                .eqIfPresent(DataNbUsermonitorinfoDO::getLat, reqVO.getLat())
                .eqIfPresent(DataNbUsermonitorinfoDO::getFireGridId, reqVO.getFireGridId())
                .eqIfPresent(DataNbUsermonitorinfoDO::getMonitoringType, reqVO.getMonitoringType())
                .eqIfPresent(DataNbUsermonitorinfoDO::getAppId, reqVO.getAppId())
                .eqIfPresent(DataNbUsermonitorinfoDO::getDataId, reqVO.getDataId())
                .eqIfPresent(DataNbUsermonitorinfoDO::getStatus, reqVO.getStatus())
                .eqIfPresent(DataNbUsermonitorinfoDO::getCreateUser, reqVO.getCreateUser())
                .eqIfPresent(DataNbUsermonitorinfoDO::getUpdateUser, reqVO.getUpdateUser()));
                //.eqIfPresent(DataNbUsermonitorinfoDO::getInstallUserType, reqVO.getInstallUserType())
                //.orderByDesc(DataNbUsermonitorinfoDO::getId));
    }

}